package com.qianxiwitmanagement.controller;


import com.qianxi.wit.pojo.TbBankcard;
import com.qianxi.wit.result.R;
import com.qianxiwitmanagement.service.TbBankcardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zqp
 * @since 2021-01-15
 */
@RestController
@RequestMapping("/bankcard")
public class TbBankcardController {

    @Autowired
    private TbBankcardService bankcardService;

    //添加银行卡
    @PostMapping("/addbankcard")
    public R addbankcard(@RequestBody TbBankcard bankcard){
        try {
            bankcardService.addbankcard(bankcard);
            return R.ok();
        }catch (Exception e){
            e.printStackTrace();
            return R.error();
        }
    }
}

